app.controller('TrackPerCtrl', ['$scope','$state', '$stateParams','$http','DiagramService','$anchorScroll','$location',TrackPerCtrl]);

function TrackPerCtrl($scope,$state, $stateParams,$http,DiagramService,$anchorScroll,$location){
	console.log($stateParams.id)
		$anchorScroll.yOffset = -40; 
	$location.hash('');
	$anchorScroll();

	$scope.highFrequencyPlaces = [
		{
			name:'千山(网翼网咖)',
			address:'浙江省杭州市江干区同协路378号',
			lastTime:'2017-05-21-23-49-44',
			frequency:31
		},
		{
			name:'千山(网翼网咖)',
			address:'浙江省杭州市江干区同协路378号',
			lastTime:'2017-05-21-23-49-44',
			frequency:31
		},
		{
			name:'千山(网翼网咖)',
			address:'浙江省杭州市江干区同协路378号',
			lastTime:'2017-05-21-23-49-44',
			frequency:31
		},
		{
			name:'千山(网翼网咖)',
			address:'浙江省杭州市江干区同协路378号',
			lastTime:'2017-05-21-23-49-44',
			frequency:31
		},
		{
			name:'千山(网翼网咖)',
			address:'浙江省杭州市江干区同协路378号',
			lastTime:'2017-05-21-23-49-44',
			frequency:31
		},
		{
			name:'千山(网翼网咖)',
			address:'浙江省杭州市江干区同协路378号',
			lastTime:'2017-05-21-23-49-44',
			frequency:31
		},
		{
			name:'千山(网翼网咖)',
			address:'浙江省杭州市江干区同协路378号',
			lastTime:'2017-05-21-23-49-44',
			frequency:31
		}
	]

	$scope.trackInfos = [
		{
			type:'流动人口信息',
			time:'2018-07-17'
		},
		{
			type:'网吧',
			time:'2018-07-17'
		}
	]

	$scope.changeToUrl = function(type){
		if(type=='流动人口信息'){
			url = '../img/track/红.png';
		}else if(type=='网吧'){
			url = '../img/track/黄.png';
		}else{
			url = '../img/track/绿.png';
		}
		return url;
	}
}
